import request from "@/utils/request";

export function login(data) {
  return request({
    url: `/login`,
    method: "post",
    data,
  });
}

export function captcha(key) {
  return request({
    url: `/captcha`,
    method: "get",
    params: { key },
  });
}

export function getInfo() {
  return request({
    url: `/userinfo`,
    method: "get",
  });
}

export function logout() {
  return request({
    url: `/logout`,
    method: "post",
  });
}

export function autoLogin(data) {
  return request({
    url: `/signed-login`,
    method: "post",
    data,
  });
}
